package com.ddstation.ncovreport.service.impl;

import com.ddstation.ncovreport.mapper.NcovReportMapper;
import com.ddstation.ncovreport.model.NcovParModel;
import com.ddstation.ncovreport.model.NocResModel;
import com.ddstation.ncovreport.model.NocStatisticsResModel;
import com.ddstation.ncovreport.service.NcovReportService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.inject.Inject;
import java.util.List;

@Service
public class NcovReportServiceImpl implements NcovReportService {
	@Inject private NcovReportMapper ncovReportMapper;

	@Override
	@Transactional(readOnly=true)
	public List<NocResModel> searchNcovReportList(NcovParModel _in) {
		return ncovReportMapper.selectNcovReportList(_in);
	}

	@Override
	@Transactional(readOnly=true)
	public NocResModel searchNcovReportDetail(String institutionId,String doctorId,String Id) {
		return ncovReportMapper.searchNcovReportDetail( institutionId, doctorId, Id);
	}

	@Override
	@Transactional(readOnly=true)
	public List<NocStatisticsResModel> searchStatisticsPatientList(NcovParModel parameter) {
		return ncovReportMapper.searchStatisticsPatientListByInstitution(parameter);
	}

	@Override
	@Transactional(readOnly=true)
	public NocStatisticsResModel searchStatisticsPatientAmount(NcovParModel parameter) {
		return ncovReportMapper.searchStatisticsPatientAmountByInstitution(parameter);
	}
}
